home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / GLUT-3.7 / PROGS / DEMOS / rollercoaster / MATRIX.H < prev    next >
Encoding:
Text File  |  1998-08-12  |  525 b   |  19 lines

  1. typedef struct matrix {
  2.     double index[4][4];
  3. } Matrix;
  4.  
  5. typedef struct vector {
  6.     double index[4];
  7. } Vector;
  8.  
  9. void init_matrix(Matrix *m);
  10. void init_vector(Vector *v);
  11. void copy_vector(Vector *v1, Vector *v2);
  12. void copy_matrix(Matrix *m1, Matrix *m2);
  13. void multiply_vector_matrix(Matrix *m, Vector *v);
  14. void multiply_matrix_vector(Matrix *m, Vector *v);
  15. void multiply_matrix(Matrix *m1, Matrix *m2);
  16. void rotate_x(double angle, Matrix *m);
  17. void rotate_y(double angle, Matrix *m);
  18. void rotate_z(double angle, Matrix *m);
  19.